package com.example.mynetwork2.mvpdesign.presenter;

import com.example.mynetwork2.mvpdesign.model.FanyiModel;
import com.example.mynetwork2.mvpdesign.model.IfanyiModel;
import com.example.mynetwork2.mvpdesign.view.iview.IFanyiView;

public class CidianPresenter implements  ICidianPresenter {
    private IFanyiView fanyiView;
    private FanyiModel fanyiModel;
    public  CidianPresenter(IFanyiView fanyiView){
        this.fanyiView= fanyiView;
        fanyiModel = new FanyiModel();
    }


    @Override
    public void inputToModel(String input) {
        fanyiModel.handleData(input,this);

    }

    @Override
    public void onSuccess(String str) {
      fanyiView.setInfo(str);
    }

    @Override
    public void onError() {
        fanyiView.setError();

    }
}
